package com.gzx.plugin.tjzy.modular.sms.api.strategy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zjt
 * @description
 * @date 2025/3/19 16:44
 */
@Component
public class SMSStrategyFactory {

    @Autowired
    private List<SMSStrategy> smsStrategyList;

    public SMSStrategy getStrategy(String code) {
        for (SMSStrategy strategy : smsStrategyList) {
            if (code.equals(strategy.getCurrentSupplierCode())) {
                return strategy;
            }
        }
        return null;
    }
}
